package cn.ee.dfs.webservice.controller;

import cn.ee.dfs.common.entity.DfsResponse;
import cn.ee.dfs.webservice.CxfClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Description:
 * Created by TWJ on 2019/10/15 0015 0025 上午 11:00 .
 */
@RestController
@Slf4j
public class WebserviceController {

    @RequestMapping("webservice/orderInfo/{count}")
    public Object orderInfo(@PathVariable(name = "count") int count) {

        return CxfClient.getOrderInfoList(count);
    }

    @RequestMapping("webservice/craftInfo/{count}")
    public Object craftInfo(@PathVariable(name = "count") int count) {

        return CxfClient.getCraftInfoList(count);
    }

    @RequestMapping("webservice/times")
    public Object getTimeMillis() {
        return new DfsResponse().success().data(CxfClient.getTimeMillis());
    }

}
